﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类tModuleTree
	/// </summary>
	[Serializable]
	public class tModuleTree : Entity 
	{ 
		 public tModuleTree() 
            : base("tModuleTree") 
        { 

        }


		#region Model
		private int _ModuleTreeUID;
		private string _ModuleAlias;
		private string _ModuleID;
		private int _ImageIndex;
		private bool _IsFolder;
		private int _Seq;
		private int _ParentID;
		private string _URL;
	 
		/// <summary>
		/// 
		/// </summary>
		public int ModuleTreeUID
		{
			get{ return _ModuleTreeUID; }
			set
			{
				this.OnPropertyValueChange(_.ModuleTreeUID,_ModuleTreeUID,value);
				this._ModuleTreeUID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleAlias
		{
			get{ return _ModuleAlias; }
			set
			{
				this.OnPropertyValueChange(_.ModuleAlias,_ModuleAlias,value);
				this._ModuleAlias = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModuleID
		{
			get{ return _ModuleID; }
			set
			{
				this.OnPropertyValueChange(_.ModuleID,_ModuleID,value);
				this._ModuleID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int ImageIndex
		{
			get{ return _ImageIndex; }
			set
			{
				this.OnPropertyValueChange(_.ImageIndex,_ImageIndex,value);
				this._ImageIndex = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool IsFolder
		{
			get{ return _IsFolder; }
			set
			{
				this.OnPropertyValueChange(_.IsFolder,_IsFolder,value);
				this._IsFolder = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int Seq
		{
			get{ return _Seq; }
			set
			{
				this.OnPropertyValueChange(_.Seq,_Seq,value);
				this._Seq = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int ParentID
		{
			get{ return _ParentID; }
			set
			{
				this.OnPropertyValueChange(_.ParentID,_ParentID,value);
				this._ParentID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string URL
		{
			get{ return _URL; }
			set
			{
				this.OnPropertyValueChange(_.URL,_URL,value);
				this._URL = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.ModuleTreeUID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.ModuleTreeUID,
				_.ModuleAlias,
				_.ModuleID,
				_.ImageIndex,
				_.IsFolder,
				_.Seq,
				_.ParentID,
				_.URL
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_ModuleTreeUID,
				_ModuleAlias,
				_ModuleID,
				_ImageIndex,
				_IsFolder,
				_Seq,
				_ParentID,
				_URL
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "ModuleTreeUID":
                    this._ModuleTreeUID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "ModuleAlias":
                    this._ModuleAlias = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ModuleID":
                    this._ModuleID = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ImageIndex":
                    this._ImageIndex = DataHelper.ConvertValue<int>(value);
                    break; 
				case "IsFolder":
                    this._IsFolder = DataHelper.ConvertValue<bool>(value);
                    break; 
				case "Seq":
                    this._Seq = DataHelper.ConvertValue<int>(value);
                    break; 
				case "ParentID":
                    this._ParentID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "URL":
                    this._URL = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "ModuleTreeUID":
                    return this._ModuleTreeUID; 
				case "ModuleAlias":
                    return this._ModuleAlias; 
				case "ModuleID":
                    return this._ModuleID; 
				case "ImageIndex":
                    return this._ImageIndex; 
				case "IsFolder":
                    return this._IsFolder; 
				case "Seq":
                    return this._Seq; 
				case "ParentID":
                    return this._ParentID; 
				case "URL":
                    return this._URL; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","tModuleTree");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleTreeUID = new Field("ModuleTreeUID","tModuleTree","ModuleTreeUID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleAlias = new Field("ModuleAlias","tModuleTree","ModuleAlias");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModuleID = new Field("ModuleID","tModuleTree","ModuleID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ImageIndex = new Field("ImageIndex","tModuleTree","ImageIndex");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsFolder = new Field("IsFolder","tModuleTree","IsFolder");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Seq = new Field("Seq","tModuleTree","Seq");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ParentID = new Field("ParentID","tModuleTree","ParentID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field URL = new Field("URL","tModuleTree","URL");
		}
		#endregion

 
	}
}

